package com.njzxw.yoga.yogaApi.bean;

import com.njzxw.fs.commonutil.annotation.ValidInsert;
import com.njzxw.fs.commonutil.annotation.ValidUpdate;
import com.njzxw.fs.commonutil.bean.BaseBean;
import com.njzxw.fs.commonutil.util.Validator;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.*;
import java.util.List;

@Setter
@Getter
@ToString(callSuper = true)
public class ShopInfoBean extends BaseBean {

    @ValidInsert
    @ValidUpdate
    @NotBlank(message = "商铺名称不可为空",groups={Insert.class,Update.class,Save.class})
    @Size(max = 255,min = 0,message = "商铺名称最大长度不能超过255",groups={Insert.class,Update.class,Delete.class,QueryPage.class,Save.class})
    public String shop_name;

    @ValidInsert
    @ValidUpdate
    public String shop_pic;


    @ValidInsert
    @ValidUpdate
    public String shop_tel;

    @ValidInsert
    @ValidUpdate
    @Size(max = 1000,min = 0,message = "商铺介绍最大长度不能超过1,000",groups={Insert.class,Update.class,Delete.class,QueryPage.class,Save.class})
    public String shop_desc;

    @ValidInsert
    @ValidUpdate
    @Size(max = 100,min = 0,message = "商铺早班开始时间最大长度不能超过100",groups={Insert.class,Update.class,Delete.class,QueryPage.class,Save.class})
    public String shop_mor_start;

    @ValidInsert
    @ValidUpdate
    @Size(max = 100,min = 0,message = "商铺早班结束时间最大长度不能超过100",groups={Insert.class,Update.class,Delete.class,QueryPage.class,Save.class})
    public String shop_mor_end;

    @ValidInsert
    @ValidUpdate
    @Size(max = 100,min = 0,message = "商铺晚班开始时间最大长度不能超过100",groups={Insert.class,Update.class,Delete.class,QueryPage.class,Save.class})
    public String shop_after_start;

    @ValidInsert
    @ValidUpdate
    @Size(max = 100,min = 0,message = "商铺晚班结束时间最大长度不能超过100",groups={Insert.class,Update.class,Delete.class,QueryPage.class,Save.class})
    public String shop_after_end;

    @ValidInsert
    @ValidUpdate
    public String shop_province;

    @ValidInsert
    @ValidUpdate
    public String shop_city;

    @ValidInsert
    @ValidUpdate
    public String shop_district;

    public String shop_district0;
    public String shop_district1;
    public String shop_district2;

    @ValidInsert
    @ValidUpdate
    @NotBlank(message = "店铺详细地址不可为空",groups={Insert.class,Update.class,Save.class})
    @Size(max = 200,min = 0,message = "店铺详细地址最大长度不能超过200",groups={Insert.class,Update.class,Delete.class,QueryPage.class,Save.class})
    public String shop_address;

    @ValidInsert
    @ValidUpdate
    @NotBlank(message = "经度不可为空",groups={Insert.class,Update.class,Save.class})
    @Size(max = 50,min = 1,message = "经度最大长度不能超过50",groups={Insert.class,Update.class,Delete.class,QueryPage.class,Save.class})
    public String shop_long;

    @ValidInsert
    @ValidUpdate
    @NotBlank(message = "维度不可为空",groups={Insert.class,Update.class,Save.class})
    @Size(max = 50,min = 1,message = "维度最大长度不能超过50",groups={Insert.class,Update.class,Delete.class,QueryPage.class,Save.class})
    public String shop_lat;

    @ValidInsert
    public String shop_bgtime;

    public String max_shop_bgtime;

    public String min_shop_bgtime;

    @ValidInsert
    public String shop_endtime;

    public String max_shop_endtime;

    public String min_shop_endtime;

    @ValidInsert
    @ValidUpdate
    @NotNull(message = "门店在微信端门店列表的显示顺序不可为空",groups={Insert.class,Update.class,Save.class})
    @Pattern(regexp = Validator.INT_DOUBLE,message = "门店在微信端门店列表的显示顺序，越小越靠前必须为数字或为空",groups={Insert.class,Update.class,Delete.class,QueryPage.class,Save.class})
    public String shop_orderby;

//    @ValidInsert
//    public String merchant_id;

    @ValidInsert
    @ValidUpdate
    @NotNull(message = "商铺状态不可为空",groups={Insert.class,Update.class,Save.class})
    @Pattern(regexp = "((\\-|\\+)?\\d+(\\.\\d+)?)|(\\s*)",message = "商铺状态 shop_status 装修、歇业、停业、删除必须为数字或为空",groups={Insert.class,Update.class,Delete.class,QueryPage.class,Save.class})
    public String shop_status;

    public String oper_date;

    public String max_oper_date;

    public String min_oper_date;

//    @ValidInsert
//    @ValidUpdate
//    @NotBlank(message = "更新人操作人编号不可为空",groups={Insert.class,Update.class,Save.class})
//    @Size(max = 50,min = 0,message = "更新人操作人编号最大长度不能超过50",groups={Insert.class,Update.class,Delete.class,QueryPage.class,Save.class})
//    public String update_oper_id;

//    @ValidInsert
    @ValidUpdate
    public String update_oper_date;

//    public String max_update_oper_date;

//    public String min_update_oper_date;

    @ValidInsert
    public String msm_num;


    public interface Insert{}

    public interface Update{}

    public interface Delete{}

    public interface QueryPage{}

    public interface QueryId{}

    public interface Save{}

}